#include"list.hpp"
#include"reve_iterator.hpp"
using namespace std;
void test1()
{
    hcc::list<int> s;
    s.push_back(1);
    s.push_back(3);
    s.push_back(2);
    for(auto e : s)
        std::cout<<e<<"->";
    std::cout<<std::endl;
    hcc::list<int>::iterator it=s.begin();
    while(it!=s.end())
    {
        cout<<(*it)<<"->";
        it++;
    }
    cout<<endl;
}
void test3(const hcc::list<int> l)
{
    for(auto e : l)
        cout<<e<<"->";
    cout<<endl;
}
void test2()
{
    hcc::list<int> s;
    s.push_back(1);
    s.push_back(3);
    s.push_back(2);
    s.push_front(5);
    s.push_front(6);
    // for(auto e : s)
    //     cout<<e<<"->";
    // cout<<endl;
    s.pop_back();
    // for(auto e : s)
    //     cout<<e<<"->";
    // cout<<endl;
    s.pop_front();
    // for(auto e : s)
    //     cout<<e<<"->";
    // cout<<endl;
    //test3(s);
    hcc::list<int>::riterator rit=s.rbegin();
    while(rit!=s.rend())
    {
        cout<<(*rit)<<"->";
        rit++;
    }
}
void test4()
{
    hcc::list<int> s;
    s.push_back(1);
    s.push_back(2);
    s.push_back(3);
    s.push_back(4);
    s.push_back(5);
    hcc::list<int> l;
    l=s;
    for(auto e : l)
    {
        cout<<e<<"->";
    }
    cout<<endl;
}
int main()
{
    //test1();
    //test2();
    test4();
    return 0;
}
